home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / oop_tp55.zip / LIST1_1.PAS < prev    next >
Pascal/Delphi Source File  |  1989-12-03  |  1KB  |  67 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.                  type
  8.                  XYZ = record
  9.                        a : integer;
  10.                        b : real;
  11.                        c : string[32];
  12.                        end;
  13.                  
  14.                  procedure Init( aa : integer; bb : real; cc : string;
  15.                                  var Rec : XYZ);
  16.                  begin
  17.                       with Rec do
  18.                       begin
  19.                          a := aa;
  20.                          b := bb;
  21.                          c := cc;
  22.                       end;
  23.                  end;
  24.                  
  25.                  var
  26.                  R    :    XYZ;
  27.                  
  28.                  begin
  29.                  
  30.                  Init( 1234, 2.712,
  31.                              'The string is 32 characters long', R);
  32.                  writeln( 'The integer value is ', R.a );
  33.                  writeln( 'The string value is ', R.c );
  34.                  writeln( 'The real value is ', R.b );
  35.                  
  36.                  end.
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.